package com.sne.sys.entity;

import com.sne.common.entity.BaseModel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * <p>
 * 菜单
 * </p>
 *
 * @author fanghh
 * @since 2020-01-03
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value = "SysMenu对象", description = "菜单")
public class SysMenu extends BaseModel<SysMenu> {

    @ApiModelProperty(value = "菜单编号")
    private String menuCode;

    @NotBlank(message = "菜单名称不为空")
    @ApiModelProperty(value = "菜单名称")
    private String menuName;

    @NotNull(message = "菜单类型不为空")
    @ApiModelProperty(value = "菜单类型")
    private Integer type;

    @ApiModelProperty(value = "url地址")
    private String url;

    @ApiModelProperty(value = "组件")
    private String component;

    @ApiModelProperty(value = "图标")
    private String icon;

    @NotNull(message = "排序值不为空")
    @ApiModelProperty(value = "排序")
    private Integer sort;

    @ApiModelProperty(value = "是否外部链接，0：否，1：是")
    private Boolean externalLink;

    @ApiModelProperty(value = "权限标识")
    private String permissionCode;

    @ApiModelProperty(value = "是否可见")
    private Boolean showed;

    @ApiModelProperty(value = "父级id")
    private Long parentId;

    @NotNull(message = "状态不为空")
    @ApiModelProperty(value = "状态")
    private Boolean state;

    @ApiModelProperty(value = "备注")
    private String note;

}
